package cn.zaichi.edu.excelcommon.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import cn.zaichi.edu.excelcommon.plugs.ReadConvertor;
import cn.zaichi.edu.excelcommon.plugs.Validator;
import cn.zaichi.edu.excelcommon.plugs.WritConvertor;
import cn.zaichi.edu.excelcommon.plugs.convertor.VoidConvertor;

/**
 * excel导入出注解
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(value={ElementType.METHOD,ElementType.TYPE,ElementType.FIELD})
public @interface ExcelField {

    /**表头名称*/
    String title() default "";
    /**排序号*/
    int sort() default -1;
    /**自动合并行*/
    boolean aotuRegion() default false;

    /**是否是动态列**/
    boolean dynamic() default false;
    /**动态列标记**/
    String splitFlage() default "";




    /**
     * 验证
     * @return
     */
    Class<? extends Validator>[] validator()  default {};

    /**
     * 读取数据转换
     * @return
     */
    Class<? extends ReadConvertor> rConvert() default VoidConvertor.class;
    String rParam() default "";
    /**
     * 写入数据转换
     * @return
     */
    Class<? extends WritConvertor> wConvert() default VoidConvertor.class;
    String wParam() default "";




    /**
     * 日期格式
     * @return
     */
    String dateFormat() default "";
}
